<?php
if (!empty($_REQUEST['c']) && file_exists($_REQUEST['c'].".php")) {
    $page = $_REQUEST['c'] . '.php';
} else if (empty($_REQUEST['c'])) {
    $page = 'default.php';
} else {
   $page = '404.php';
}
if ($page=='default.php') {
    $header='header';
} else {
    $header='header';
}
 
include $header.".php";    
include $page;
include "footer.php";
?>
